<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ include file="../common/taglibs.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <title>机构出款查询</title>
    <link rel="icon" href="favicon.ico" type="image/x-icon"/>
    <!-- 当前页面样式 -->
    <link rel="stylesheet" href="<s:url value="/css/common.css"/>"/>
    <!-- 当前页面样式 END -->
    <script type="text/javascript" src="<c:url value="/js/jquery-1.3.2.js" />"></script>
	<script type="text/javascript" src="<c:url value="/js/common.js" />"></script>
	<script type="text/javascript" src="<c:url value="/js/My97DatePicker/WdatePicker.js"/>"></script>
	<script type="text/javascript">
	
	//查询结算信息
		function queryCheck(){
				$("#querytoPayForm").attr("action","<%=basePath%>orgpay/queryToPayMoneyJsp.ct")
				$("#querytoPayForm").submit();
				$("#queryBtnId").attr("disabled","true");
		}
	//导出excel	
		function exportCheck(){				
					$("#querytoPayForm").attr("action","<%=basePath%>orgpay/exportInit.ct")
					$("#querytoPayForm").submit();
					$("#szPower").attr("disabled","true");	
		}
	</script>
</head>
<body>
<s:form id="querytoPayForm" action="/orgpay/queryToPayMoneyJsp.ct" method="post" theme="simple">
<table class="tb">
    <tbody>
        <tr class="tb-line">
            <td class="tb-td" colspan="4"><div class="tb-h2">POS收单运营管理平台</div></td>
        </tr>

        <tr class="tb-line">
            <td class="tb-td" colspan="4"><div class="tb-h3">机构出款查询</div></td>
        </tr>
		<tr class="tb-line">
            
            <td align="right" class="tb-td">
                <div class="tb-h4">手机号：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-normal">
                <s:textfield name="searchCondition.phone" cssClass="queryWidth"></s:textfield>
                </label>
            </td>
            
            <td align="right" class="tb-td">
                <div class="tb-h4">账号：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-normal">
                <s:textfield name="searchCondition.accountNo" cssClass="queryWidth"></s:textfield>
                </label>
            </td>
        </tr>		
        <tr class="tb-line">
            <td width="12%" style="min-width: 150px" align="right" class="tb-td">
                <div class="tb-h4">入账卡号：</div>
            </td>
            <td class="tb-td">
 				<label class="tb-input-normal">
 				 <s:textfield name="searchCondition.acctNo" cssClass="queryWidth"></s:textfield>
 				</label></td>
			<td align="right" class="tb-td">
                <div class="tb-h4">结算日期：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-mini">
                <s:textfield id="settleDateMin" name="searchCondition.applyDateMin" placeholder="起始日期" onFocus="WdatePicker({dateFmt:'yyyyMMdd',readOnly:true,wdate:true,errDealMode:0});" cssClass="queryWidth"></s:textfield>
                </label>-
                <label class="tb-input-mini">
                <s:textfield id="settleDateMax" name="searchCondition.applyDateMax" placeholder="结束日期" onFocus="WdatePicker({dateFmt:'yyyyMMdd',readOnly:true,wdate:true,errDealMode:0});" cssClass="queryWidth"></s:textfield>
                </label>
            </td>
            
        </tr>
         <tr class="tb-line">
 
			<td width="12%" style="min-width: 150px" align="right" class="tb-td">
                <div class="tb-h4">机构：</div>
            </td>
            <td class="tb-td">
 				<label class="tb-select">
				 <%-- <s:select name="searchCondition.org" list="#{'':'不限','48500801':'48500801_邮易通','48500552':'48500552_小兵支付','48500611':'48500611_至尊宝','48500741':'48500741_汉富通','48500981':'48500981_山东辰佰','48500791':'48500791_易势'}"  cssClass="queryWidth" id="org"/> --%> 
               	<s:select name="searchCondition.org" list="orgList" listKey="InsIdCd" listValue="InsName" headerKey="" headerValue="请选择" cssClass="queryWidth"/>
                </label>
             </td>
             <td align="right" class="tb-td">
                <div class="tb-h4">交易日期：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-mini">
                <s:textfield id="setDateMin" name="searchCondition.setDateMin" placeholder="起始日期" onFocus="WdatePicker({dateFmt:'yyyyMMdd',readOnly:true,wdate:true,errDealMode:0});" cssClass="queryWidth"></s:textfield>
                </label>-
                 <label class="tb-input-mini">
                <s:textfield id="setDateMax" name="searchCondition.setDateMax" placeholder="结束日期" onFocus="WdatePicker({dateFmt:'yyyyMMdd',readOnly:true,wdate:true,errDealMode:0});" cssClass="queryWidth"></s:textfield>
                </label>
            </td>          
        </tr>
         <tr class="tb-line">
 
			<td width="12%" style="min-width: 150px" align="right" class="tb-td">
                <div class="tb-h4">出款状态：</div>
            </td>
            <td class="tb-td">
 				<label class="tb-select">
				 <s:select name="searchCondition.status" list="#{'01':'出款申请中','02':'出款申请成功','04':'出款申请处理中','05':'人工处理','03':'出款结果失败','00':'出款结果成功'}" headerKey="" headerValue="不限" cssClass="queryWidth" id="status"/> 
                </label>
             </td>
             <td align="right" class="tb-td">
                <div class="tb-h4">流水号：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-normal">
                <s:textfield id="setDate" name="searchCondition.merchantsn"  cssClass="queryWidth"></s:textfield>
                </label>
            </td>          
        </tr>
         <tr class="tb-line">
             <td align="right" class="tb-td">
                <div class="tb-h4">交易键值：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-normal">
                <s:textfield id="setDate" name="searchCondition.id"  cssClass="queryWidth"></s:textfield>
                </label>
            </td> 
             <td width="12%" style="min-width: 150px" align="right" class="tb-td">
                <div class="tb-h4">出款类型：</div>
            </td>
            <td class="tb-td">
 				<label class="tb-select">
				 <s:select name="searchCondition.type" list="#{'2201':'D0补付','2301':'T1代付','2401':'T1补付'}" headerKey="" headerValue="不限" cssClass="queryWidth" id="type"/> 
                </label>
             </td>         
        </tr>
		<tr>
						<td colspan="4" align="center"><span style="color: red"><s:actionerror /></span>
							<span style="color: red;"><s:actionmessage /></span > <span style="color: red;"><s:fielderror
									cssClass="fieldError" /></span>
							<span id="otherError"></span>
						</td>
		</tr>
        
        <tr class="tb-line">
            <td class="tb-td line-submit" align="right" colspan="4">
                <label class="tb-input-submit">
                    <input id="queryBtnId" type="button" value="查询" onclick="queryCheck()"/>
                </label>
                <label class="tb-input-submit">
                    <input type="reset" value="取消"/>
                </label>
                <label class="tb-input-submit">
                	<s:if test="#request.searchRsList != null && #request.searchRsList.size>0">
					   		<input id="szPower" type="button" value="导 出" onclick="exportCheck()"/>				   
					</s:if>
					<s:else>
					 	<input id="szPower" disabled="disabled" value="导  出" type="button" /> 
					</s:else>
                </label>
            </td>
        </tr>
        <s:if test="#request.searchRsList != null && #request.searchRsList.size>0">
			<tr class="tb-line">
				<td class="tb-td paging"  align="left" colspan="4"> <page:pageCount
								max_pages="11" totalPage="${requestScope.totalPage}"
								currentPage="${requestScope.currentPage}"
								action="${rootPath}/orgpay/queryToPayMoneyJsp.ct?currentPage=" />

				</td>
			</tr>
		</s:if>
    </tbody>
</table>

<div class="big-tb">
    <table class="tb" style="width: 180%;">
        <thead>
            <tr class="tb-line">
                <th class="tb-th" colspan="19">出款信息列表</th>
            </tr>
            <tr class="tb-line bg-gray">
            	<th class="tb-th">交易键值</th>
            	<th class="tb-th">出款状态</th>
            	<th class="tb-th">出款金额（元）</th>
                <th class="tb-th">总笔数（笔）</th>
                <th class="tb-th">费率</th>
                <th class="tb-th">入账卡号</th>
                <th class="tb-th">银行名称</th>
                <th class="tb-th">入账姓名</th>
            	<th class="tb-th">机构号</th>
                <th class="tb-th">账号</th>
                <th class="tb-th">手机号</th>                
                <th class="tb-th">出款类型</th>                                              
                <th class="tb-th">流水号</th>               
                <th class="tb-th">结算日期</th>
                <th class="tb-th">交易日期</th>                         
            </tr>
        </thead>
        <tbody>
			<s:iterator value="#request.settleList" status="stat" id="bean">
				<tr  class="tb-line">
					<td class="tb-td">
						<s:property value="#bean.keyRsp"/>
					</td>
					<td class="tb-td">
						<s:property value="#bean.status"/>
					</td>
					<td class="tb-td">
						<s:property value="#bean.amt"/>
					</td>
					<td class="tb-td">
						<s:property value="#bean.totalNum"/>
					</td>
					<td class="tb-td">
						<s:property value="#bean.fee"/>
					</td>
					<td class="tb-td">
						<s:property value="#bean.acctNo"/>
					</td>
					<td class="tb-td">
						<s:property value="#bean.bankName"/>
					</td>			
					<td class="tb-td">
						<s:property value="#bean.acctName"/>
					</td>										
					<td class="tb-td">
						<s:property value="#bean.orgCode"/>
					</td>
					<td class="tb-td">
						<s:property value="#bean.accountNo"/>
					</td>
					
					<td class="tb-td">
						<s:property value="#bean.mobileNo"/>
					</td>
					<td class="tb-td">
						<s:property value="#bean.transCd"/>
					</td>														
					<td class="tb-td">
						<s:property value="#bean.remark1"/>
					</td>
					<td class="tb-td">
						<s:property value="#bean.settleDate"/>
					</td>
					<td class="tb-td">
						<s:property value="#bean.remark6"/>
					</td>
				</tr>
			</s:iterator>
        </tbody>
    </table>
</div>
</s:form>
</body>
</html>